----------------------------------------------------------------------------------------------------------------------------------
--[[

    血梅香



]]--
----------------------------------------------------------------------------------------------------------------------------------
--
    local debuff_prefab = "hutao_debuff_blood_plum_scent"
    local function GetDebuffNames(player)
        local debuff_name = debuff_prefab.."."..tostring(player.userid)
        return debuff_name,debuff_prefab
    end
----------------------------------------------------------------------------------------------------------------------------------
local hutao_com_blood_plum_scent_for_player = Class(function(self, inst)
    self.inst = inst


end,
nil,
{

})
------------------------------------------------------------------------------------------------------------------------------
--
    function hutao_com_blood_plum_scent_for_player:HasDebuff(target)
        local debuff_name,debuff_prefab = GetDebuffNames(self.inst)
        local debuff_inst = target:GetDebuff(debuff_name)
        if debuff_inst and debuff_inst:IsValid() then
            return true, debuff_inst
        end
        return false,nil
    end
------------------------------------------------------------------------------------------------------------------------------
--
    function hutao_com_blood_plum_scent_for_player:GetTargetDebuff(target)
        local debuff_name,debuff_prefab = GetDebuffNames(self.inst)
        local test_num = 100
        local debuff_inst = nil
        while test_num > 0 do
            debuff_inst = target:GetDebuff(debuff_name)
            if debuff_inst and debuff_inst:IsValid() then
                break
            end
            target:AddDebuff(debuff_name,debuff_prefab)
            test_num = test_num - 1
        end
        if debuff_inst then
            debuff_inst.components.hutao_com_blood_plum_scent_for_debuff:SetPlayer(self.inst)
        end
        return debuff_inst
    end

    function hutao_com_blood_plum_scent_for_player:HitTarget(target)
        local debuff_inst = self:GetTargetDebuff(target)
    end
------------------------------------------------------------------------------------------------------------------------------
return hutao_com_blood_plum_scent_for_player







